<header class="HolyGrail-header">
	<div id="header" class="Header Header--cozy">
			<div class="logo Header-titles"><a href="/home"><img src="/static/images/logo.png" alt=""></a></div>
			<div class="Header-actions nav-container Grid">
				<? 	$items =   array(
						array('nav' => 'index', 'content' => '首页'), 
						array('nav' => 'about', 'content' => '关于我们'), 
						array('nav' => 'detail', 'content' => '滑坡监测'), 
						array('nav' => 'detail2', 'content' => '活断层监测'), 
						array('nav' => 'detail3', 'content' => '活断层监测'),
					);
					 foreach($items as $i) {
					?>
						<? if ($i['nav'] == $nav) { ?>
							<div class="Grid-cell nav-item active"><a href="/home/<?= $i['nav']?>"><?= $i['content'] ?></a></div>
						<?} else { ?>
							<div class="Grid-cell nav-item"><a href="/home/<?= $i['nav']?>"><?= $i['content'] ?></a></div>
						<?}?>
						
					<?}
				?>
			</div>
			<div class="user-block">
				<i class="iconfont icon-user"></i>
				<? if ($username) { 
					?>
					<span class="hello"><a href="/admin/user/profile"><?= $username ?></a>, <a href="/login/signout">退出</a></span>
					<?
				} else {
					?>
					<span class="hello"><a href="/login">登录</a></span>
					<?
				}
				?>
			</div>
		</div>
</header>